import { createApp } from 'vue'
import { createPinia } from 'pinia'

import App from '@/App.vue'
import router from './router'
//引入element-plus插件和样式
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//配置element-plus国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//导入svg图标
import 'virtual:svg-icons-register'
//引入自定义插件对象，注册整个项目全局组件
import globalComponent from '@/components/index'
//引入全局守卫
import './permission'
const app = createApp(App)
app.use(createPinia())
app.use(router)
app.use(ElementPlus, {
  locale: zhCn,
})
//安装自定义插件
app.use(globalComponent)
//引入模板的全局样式
import '@/styles/index.sass'
//测试

app.mount('#app')
